<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html> 
<head>
<%@ include file="../../include/easyui.jsp" %>
<%@ include file="../../include/pForm.jsp" %>
<title>组织编辑页面</title>
<script>
	$(function(){
		fn.resetForm();
		
		var orgMembers = fn.getDialogData().orgMembers || '';
		orgMembers = orgMembers.split(',');
		setTimeout(function(){
			$('#orgMembers').combotree('setValues', orgMembers);
		},0)
		
	});
	function orgMembersChange(newValue, oldValue){
		var groupMembers = newValue.join(",");
		$("input[name=orgMembers]").val(groupMembers);
	}
</script>
</head>
<body>
	<div class="easyui-panel" data-options="fit:true,border:false" style="padding:10px;">
		<form id="easyuiForm" method="post" action="/console/${className}/modify">
		 <!--类名属性及默认主键id-->
		 <input type="hidden" name="className" value="${className}" />
		 <input type="hidden" name="id" value="" />
		 <input type="hidden" name="ignoreProperties" value="parentId" />
		 <input type="hidden" name="createrId" value="${SESSION_USER.user.id}" />
		 <input type="hidden" name="orgMembers" value="" />

		 <div style="margin-bottom:20px">
			  	<input class="easyui-textbox" name="parentName" style="width:240px;" data-options="label:'父组织:',readonly:true" />
			 	<select class="easyui-combobox" name="orgType" style="width:240px;" data-options="label:'分类:',panelHeight:120" 
					url="/console/combobox?valueField=dicName&textField=dicName&modleName=dictionary&pCode=C5&pCode_searchType=eq" >
			 	</select>
			 </div>
			 
			 <div style="margin-bottom:20px">
			  	<input class="easyui-textbox" name="orgName" style="width:240px;" data-options="label:'组织名称:',required:true,validType:['maxLen[25]']" />
			  	<input class="easyui-textbox" name="orgNo" style="width:240px;" readonly="readonly" data-options="label:'组织编码:',required:false,validType:['maxLen[25]']" />
			 </div>
			 
			<div style="margin-bottom:20px">
			  	<select class="easyui-combobox" name="orgLeader"  style="width:240px;" data-options="label:'负责人:',multiple:false,panelHeight:120" 
				 url="/console/user/combobox?textField=nickName" >
				</select>
				<select class="easyui-combotree" id="orgMembers" editable=false style="width:240px;" data-options="label:'组成员:',multiple:true,onChange: orgMembersChange,panelHeight:120" 
				 url="/console/user/combotree?textField=nickName" >
				</select>
			 </div>
			 
			 <div style="margin-bottom:20px">
			  	<input class="easyui-numberspinner" name="orgOrder" value="0" style="width:240px;" data-options="label:'组织排序:',min:0,max:1000,required:false,validType:'maxLen[2]'" />
			 </div>
		</form>
	</div>
</body>
</html>